﻿using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Order.MicroService.IService;
using System.Threading.Tasks;

namespace Order.MicroService.Api.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class TestPollyController : ControllerBase
    {
        private readonly ITestService _iTestService;

        public TestPollyController(ITestService iTestService)
        {
            _iTestService = iTestService;
        }

        [HttpGet("GetAccount")]
        public async Task<IActionResult> GetAccountAsync()
        {
            string result = await _iTestService.GetAccountAsync();
            return Content(result);
        }
    }
}
